<div class="ym-grid linearize-level-1">
	<div class="ym-g25 ym-gl">
		<h3><%= @route.name %></h3>
		<hr>
		<div class="ym-gbox-left">
			<form class="ym-form ym collumnar">
				<div class="ym-fbox-text">
					<dl>
						<dt>von</dt><dd><%= @route.route_workers_to_link %></dd>
						<dt>geschraubt am</dt><dd><%= @route.build %></dd>
						<dt>Farbe</dt><dd><%= @route.color.name %></dd>
			 			<dt>Schwierigkeitsgrad</dt><dd><%= @route.grade.grade %></dd>
						<dt>Umlenker</dt><dd><%= @route.chain.number %></dd>
						<dt>Wandteil</dt><dd><%= @route.chain.wall.to_s %></dd>
						
						<%= link_to 'Editieren', edit_route_path(@route) if @user.is_schorsch?%> 
						<%= link_to 'Zurück', routes_path %>
				</div>
			</form>
		</div>
	</div>
	<div class="ym-g50 ym-gl">
		<div class="ym-gbox-right">
			<h3>Kommentare</h4>
			<hr>
			<% @route.comments.each do |comment| %>
				<h5><%= comment.worker.to_link %></h5>
				<%= comment.comment %><br />
				<span class="label"><%= "#{time_ago_in_words(comment.created_at)} ago" %></span>
				<hr>
			<% end %>
			
			<%= form_tag postComment_path, :class => "ym-form" do %>
			  <input name="route" type="hidden" value="<%= @route.id %>">
			    <%= text_area :kommentar, :comment %>
			  <%= submit_tag "Kommentieren" %>
			<% end %>
			</form>
		</div>
	</div>
</div>
			

<!--
<h2 class="title"><%= @route.name + " " + @route.grade.grade %></h2>

<div class="content">
<p id="notice"><%= notice %></p>

<p>
  <b>Name:</b>
  <%= @route.name %>
</p>

<p>
  <b>Build:</b>
  <%= @route.build %>
</p>

<p>
  <b>Grade:</b>
  <%= @route.grade.grade %>
</p>

<p>
  <b>Chain:</b>
  <%= @route.chain.number %>
</p>

<p>
  <b>Wall:</b>
  <%= @route.chain.wall.to_s %>
</p>

<p>
  <b>Workers:</b>
<% @route.workers.each do |worker| %>
  <%= worker.name %>
<% end %>
</p>

</div>
